package com.dc.designPattern._21_strategy.impl;

/**
 * Description: 策略模式_客户端
 * @author: gdc
 * @date: 2021/6/9
 * @version 1.0
 */
public class Client {
	public static void main(String[] args) {
		System.out.println("测试鸭子程序：");
		Duck duck = null;
		duck = new MallardDuck();
		duck = new RedHeadDuck();
		//duck = new RubberDuck();
		//duck = new BigYellowDuck();
		//duck = new SpaceDuck();
		duck.display();
		duck.speak();
		duck.fly();
		System.out.println("测试完毕。");
	}
}